﻿using System;
namespace Pairingproject2._3.answer
{
    //答题模块--------------------------------------/
    public partial class AnswerClass 
    {
        private string userAnswer = ""; //用户答案
        private string[] result = new string[1000];//正确的答案
        private bool trueFlase = false;//判断答案是否正确

        public string UserAnswer { get => userAnswer; set => userAnswer = value; }
        public string[] Result { get => result; set => result = value; }
        public bool TrueFlase { get => trueFlase; set => trueFlase = value; }


        public void CheckAnswer(int subscript)
        {       
            if (UserAnswer== Result[subscript])
            {
                //Console.WriteLine(" 回答正确!");
                TrueFlase = true;
            }
            else
            {
                //Console.WriteLine("回答错误! \n正确的答案是: " + result[subscript] + "\n您的答案:" + userAnswer);
                TrueFlase = false;
            }
        }
    }
}
